<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      Customizing your Logon with /etc/issue
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;3.&nbsp;After LFS Configuration Issues
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="vimrc.html" title=
          "The /etc/vimrc and ~/.vimrc Files">Prev</a>
          <p>
            The /etc/vimrc and ~/.vimrc Files
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="random.html" title=
          "Random Number Generation">Next</a>
          <p>
            Random Number Generation
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="config.html" title=
          "Chapter&nbsp;3.&nbsp;After LFS Configuration Issues">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="postlfs-config-logon" name=
        "postlfs-config-logon"></a>Customizing your Logon with /etc/issue
      </h1>
      <p>
        When you first boot up your new LFS system, the logon screen will be
        nice and plain (as it should be in a bare-bones system). Many people
        however, will want their system to display some information in the
        logon message. This can be accomplished using the file <code class=
        "filename">/etc/issue</code>.
      </p>
      <p>
        The <code class="filename">/etc/issue</code> file is a plain text
        file which will also accept certain escape sequences (see below) in
        order to insert information about the system. There is also the file
        <code class="filename">issue.net</code> which can be used when
        logging on remotely. <span class=
        "command"><strong>ssh</strong></span> however, will only use it if
        you set the option in the configuration file and will <span class=
        "emphasis"><em>not</em></span> interpret the escape sequences shown
        below.
      </p>
      <p>
        One of the most common things which people want to do is clear the
        screen at each logon. The easiest way of doing that is to put a
        "clear" escape sequence into <code class=
        "filename">/etc/issue</code>. A simple way of doing this is to issue
        the command <span class="command"><strong>clear &gt;
        /etc/issue</strong></span>. This will insert the relevant escape code
        into the start of the <code class="filename">/etc/issue</code> file.
        Note that if you do this, when you edit the file, you should leave
        the characters (normally '^[[H^[[2J') on the first line alone.
      </p>
      <div class="admon note">
        <img alt="[Note]" src="../images/note.png" />
        <h3>
          Note
        </h3>
        <p>
          Terminal escape sequences are special codes recognized by the
          terminal. The ^[ represents an ASCII ESC character. The sequence
          ESC [ H puts the cursor in the upper left hand corner of the screen
          and ESC 2 J erases the screen. For more information on terminal
          escape sequences see <a class="ulink" href=
          "http://rtfm.etla.org/xterm/ctlseq.html">http://rtfm.etla.org/xterm/ctlseq.html</a>
        </p>
      </div>
      <p>
        The following sequences are recognized by <span class=
        "command"><strong>agetty</strong></span> (the program which usually
        parses <code class="filename">/etc/issue</code>). This information is
        from <span class="command"><strong>man agetty</strong></span> where
        you can find extra information about the logon process.
      </p>
      <p>
        The <code class="filename">issue</code> file can contain certain
        character sequences to display various information. All <code class=
        "filename">issue</code> sequences consist of a backslash (\)
        immediately followed by one of the letters explained below (so
        <code class="option">\d</code> in <code class=
        "filename">/etc/issue</code> would insert the current date).
      </p>
      <pre class="screen">
<code class="literal">b   Insert the baudrate of the current line.
d   Insert the current date.
s   Insert the system name, the name of the operating system.
l   Insert the name of the current tty line.
m   Insert the architecture identifier of the machine, e.g., i686.
n   Insert the nodename of the machine, also known as the hostname.
o   Insert the domainname of the machine.
r   Insert the release number of the kernel, e.g., 2.6.11.12.
t   Insert the current time.
u   Insert the number of current users logged in.
U   Insert the string "1 user" or "&lt;n&gt; users" where &lt;n&gt; is the
    number of current users logged in.
v   Insert the version of the OS, e.g., the build-date etc.</code>
</pre>
      <p class="updated">
        Last updated on 2007-04-04 12:42:53 -0700
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="vimrc.html" title=
          "The /etc/vimrc and ~/.vimrc Files">Prev</a>
          <p>
            The /etc/vimrc and ~/.vimrc Files
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="random.html" title=
          "Random Number Generation">Next</a>
          <p>
            Random Number Generation
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="config.html" title=
          "Chapter&nbsp;3.&nbsp;After LFS Configuration Issues">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
